﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using Commonlib;
namespace DAL
{
    public class StylePriceDAL
    {
        //通过styleidlist获取需要购买布料的样式的ID
        public System.Data.DataTable getStylePrice(string limit)
        {
            string cmdstr = "select * from StylePriceView where "+limit;
            return SqlHelper.ExecuteDataSet(SqlHelper.SqlConnectionString, CommandType.Text, cmdstr, null).Tables[0];
        }

        public void addPrice(Albon.Model.StylePrice styleprice)
        {
            SqlParameter[] parameters =new SqlParameter[] {
					new SqlParameter("@styleID", styleprice.styleID),
					new SqlParameter("@stylePrice", styleprice.stylePrice),
					new SqlParameter("@remark", styleprice.remark)
            };
            SqlHelper.ExecuteNonQuery(SqlHelper.SqlConnectionString, CommandType.StoredProcedure, "p_stylepriceadd", parameters);
        }
    }
}
